<script lang="ts" setup>
const props = defineProps({
  id: {
    type: [Number, String],
    default: '',
  },

  name: {
    type: String,
    default: '',
  },

  hashtag: {
    type: Boolean,
    default: true,
  },

  blank: {
    type: Boolean,
    default: false,
  },
})
</script>

<template>
  <RouterLink class="component-tag" :to="`/tag/${props.id}`" :target="props.blank ? '_blank' : ''" @click.stop v-if="props.id">
    {{ props.hashtag ? '#' : '' }}{{ props.name }}
  </RouterLink>
  <a class="component-tag" href="javascript:;" v-else>
    {{ props.hashtag ? '#' : '' }}{{ props.name }}
  </a>
</template>

<style lang="scss" scoped>
</style>
